package com.afterStartup;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

/**
 * @author: cxt
 * @time: 2022/8/23
 * 启动之后第1位执行
 */
@Component
public class MyApplicationContextAware implements ApplicationContextAware {

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        System.out.println("启动之后执行：实现了ApplicationContextAware接口");
    }
}
